import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import NewUser from'../views/User/NewUser.vue'
import ChangeUser from '../views/User/ChangeUser.vue'
import DeletUser from '../views/User/DeletUser.vue'
import SearchUser from '../views/User/SearchUser.vue'
import * as path from "path";
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login,
  },
  {
    path:'/login',
    name:'Login',
    component: Login
  },
  {
    path:'/newUser',
    name:'NewUser',
    component: NewUser

  },
  {
    path:'/changeUser',
    name:'ChangeUser',
    component: ChangeUser
    
  },
  {
    path:'/deletUser',
    name:'DeletUser',
    component: DeletUser
  },
  {
    path:'/searchUser',
    name:'SearchUser',
    component :SearchUser
  },
  {
  path: '/writeBlog',
    name:'WriteBlog',
    component: ()=>import('../views/Blog/WriteBlog')
  },
  {
    path: '/deleteBlog',
    name:'DeleteBlog',
    component: ()=>import('../views/Blog/DeleteBlog')
  },
  {
    path: '/searchBlog',
    name:'SearchBlog',
    component: ()=>import('../views/Blog/SearchBlog')
  },
  {
    path:'/updateBlog',
    name:'UpdateBlog',
    component: ()=>import('../views/Blog/UpdateBlog')
  },
  {
    path:'/logout',
    name:'Logout',
    component: ()=>import('../views/Logout')
  }

]

const router = new VueRouter({
  routes
})

export default router
